<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{$websiteData['titles']}} - 文章详情</title>
    <meta name="description" content="{{$websiteData['description']}}" />
    <meta name="keywords" content="{{$websiteData['keywords']}}" />
    <link rel="stylesheet" href="/static/home/css/style.css">
</head>
<style>
    p {
        text-indent: 2em; /* 2个字符的宽度 */
    }
</style>
<body>
@include('home.index.header');

<main class="container">
    <div class="content-container">
        <article class="post-detail">
            <h2>{{$info['title']}}</h2>
            <div class="post-meta">
                <span class="post-date">{{$info['publish_time']}}</span>
            </div>
            <div class="post-content">
                {!! $info['content'] !!}
            </div>
            <div class="post-nav">
                <a href="{{route('home.article.info')}}?id={{$previousData['id']}}&indexActive={{$indexActive}}" class="prev-post">上一篇: {{$previousData['title']}}</a>
                <a href="{{route('home.article.info')}}?id={{$nextData['id']}}&indexActive={{$indexActive}}" class="next-post">下一篇: {{$nextData['title']}}</a>
            </div>
        </article>

        <aside class="sidebar">
            <div class="recent-posts">
                <h3>最新文章</h3>
                <ul>
                    @foreach($lastArticleData as $val )
                        <li><a href="{{route('home.article.info')}}?id={{$val['id']}}">{{$val['title']}}</a></li>
                    @endforeach
                </ul>
            </div>
        </aside>
    </div>
</main>

@include('home.index.footer');

<script src="/static/home/js/script.js"></script>
</body>
</html>
